package com.yangzihao.service.impl;

import com.yangzihao.mapper.NewsCategoryMapper;
import com.yangzihao.entity.NewsCategory;
import com.yangzihao.service.NewsCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class NewsCategoryServiceImpl implements NewsCategoryService {

    @Autowired
    private NewsCategoryMapper newsCategoryMapper;


    @Override
    public void insertNewsCat(NewsCategory newsCategory) {
        newsCategoryMapper.insertNewsCat(newsCategory);
    }

    @Override
    public List<NewsCategory> findAll() {
        return newsCategoryMapper.findAll();
    }
}
